% Note: 
%   1. QW is the predetermined pre-exit distribution of households.
%      1.1 Both Exiting HH and Surviving HH are consuming and working.
%      1.2 Entrant only matters for asset choice, it can be understood as:
%      they inheritate the asset from the exit households, whose asset
%      allocation choice is forced to be bp=0.
%   2. QWp = TrMat_bp*(1-XI)*QW+XI*QW_Entrant
%   3. The distribution of Exit firms is: XI*QW
function Dist_Hist=SteadyState_Distribution(PP,SS)

%% Preliminaries
QW_fzo      =   MarkovChain_InvDist(SS.TrProb.CoefMat,SS.TrProb.FlowVec);

MarginQW    =   struct();
UnitNum     =   SS.DistApp.fzo.UnitNum';
DimList     =   {[1],[2]};
NameList    =   {'f','zo'};

for dd=1:length(DimList)
    vv                  =   NameList{dd};
    MarginQW.(vv)       =   DistApp_Hist_MergeQW2Marginal(UnitNum,DimList{dd},QW_fzo,'Matrix');
end

Dist_Hist   =   struct('QW_fzo',QW_fzo, ...
                       'Marginal_fzo',MarginQW ...
                       );